package com.woniu.service.impl;
import com.woniu.adapter.EquipmentAdapter;
import com.woniu.outlet.po.Equipment;
import com.woniu.service.EquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EquipmentServiceImpl implements EquipmentService {

    @Autowired
    private EquipmentAdapter equipmentAdapter;

    @Override
    public List<Equipment> findEquipments() throws Exception{
        List<Equipment> equipments = equipmentAdapter.findEquipments();
        return equipments;
    }

    @Override
    public Equipment findEquipmentById(Long id) throws Exception {
        Equipment equipment = equipmentAdapter.findEquipmentById(id);
        return equipment;
    }
}
